<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 清空默认效果 */
        *
        {
            margin: 0px;
            padding: 0px;
        }
        #nav 
        {
            width: 100%;
            height: 50px;
            background-color: aqua;
        }
        /* 定位到nav盒子里面的a标签 */
        #nav a 
        {
            width: 160px;
            height: 50px;
            /* 块级元素 */
            display: block;
            /* 横向排列 */
            float:left;
            text-align: center;

            line-height: 50px;

            /* 去下划线 */
            text-decoration: none;
            color: brown;
        }
        /* 设置鼠标放上去的效果 */
        #nav a:hover
        {
            background-color: chartreuse;
        }
    </style>
</head>
<body>
    <div id="nav">
        <a href="#">今日上新</a>
        <a href="#">今日上新</a>
        <a href="#">今日上新</a>
        <a href="#">今日上新</a>
        <a href="#">今日上新</a>
        <a href="#">今日上新</a>
        <a href="#">今日上新</a>
        <a href="#">今日上新</a>
    </div>
</body>
</html>